from ninja import Schema, Field
from rest_framework.serializers import ModelSerializer

from models.models import Address


class AddAddressSchema(Schema):
    """
    地址添加
    """
    consignee: str = Field(default="", description="收货人")
    phone_number: str = Field(default="", description="手机号")
    province_code: str = Field(default="", description="省级区划编号")
    province_name: str = Field(default="", description="省级名称")
    city_code: str = Field(default="", description="市级区划编号")
    city_name: str = Field(default="", description="市级名称")
    district_code: str = Field(default="", description="区级区划编号")
    district_name: str = Field(default="", description="区级名称")
    detail: str = Field(default="", description="详细地址")
    is_default: bool = Field(default=False, description="是否默认")
    label: str = Field(default="", description="标签")

